/**
 * @author: tengjuyuan
 * @file: printContrainer.h
 * 打印任意容器
 */
#pragma once
#include <iostream>
#include <ostream>
using namespace std;

// 打印任意容器
template<typename Contrainer>
void printContrainer(const Contrainer& c, ostream& out = cout)
{
    if (c.empty())
    {
        return;
    }
    else
    {
        typename Contrainer::const_iterator itr = c.begin();
        out << " [ " << *itr++;
        while (itr != c.end())
        {
            out << ", " << *itr++;
        }
        out << " ]" << endl;
    } 
}
